package com.foo.CR;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;

/**
 * Created by IntelliJ IDEA.
 * User: Tejas
 * Date: 12/30/10
 * Time: 12:50 AM
 * To change this template use File | Settings | File Templates.
 */
public class Notifier
{
    public static void notify(Context context, String notTitle, String notMsg){

        NotificationManager nFM = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
        PendingIntent pI = PendingIntent.getActivity(context, 0, null, 0);

        Notification myNot = new Notification(R.drawable.icon, notTitle, System.currentTimeMillis());
        myNot.setLatestEventInfo(context, notTitle, notMsg, pI);
        myNot.defaults = Notification.DEFAULT_SOUND;
        nFM.notify(Constants.NotificationID, myNot);
    }
}
